﻿using Domain.QualityInspection_Modelling;
using MediatR;
using ReturnValue;

namespace MES.Server.API.Application.Command.QualityInspection_ModCom
{
    /// <summary>
    /// 创建质检记录命令
    /// </summary>
    public class CreateQualityInspectionCommand : IRequest<ApiResult<QualityInspection>>
    {
        public long ProductionOrderId { get; set; }
        public long MaterialGroupId { get; set; }
        public int InspectedQuantity { get; set; }
        public int QualifiedQuantity { get; set; }
        public string Inspector { get; set; }
    }

    /// <summary>
    /// 查询质检记录命令
    /// </summary>
    public class GetQualityInspectionsCommand : IRequest<ApiPaging<QualityInspection>>
    {
        public long? Id { get; set; }
        public long? ProductionOrderId { get; set; }
        public long? MaterialGroupId { get; set; }
        public int PageIndex { get; set; } = 1;
        public int PageSize { get; set; } = 20;
    }

    /// <summary>
    /// 更新质检记录命令
    /// </summary>
    public class UpdateQualityInspectionCommand : IRequest<ApiResult<QualityInspection>>
    {
        public long Id { get; set; }
        public long ProductionOrderId { get; set; }
        public long MaterialGroupId { get; set; }
        public int InspectedQuantity { get; set; }
        public int QualifiedQuantity { get; set; }
        public string Inspector { get; set; }
    }

    /// <summary>
    /// 删除质检记录命令
    /// </summary>
    public class DeleteQualityInspectionCommand : IRequest<ApiResult<object>>
    {
        public long Id { get; set; }
    }

    /// <summary>
    /// 获取生产工单与物料群组的联动数据
    /// </summary>
    public class GetProductionCascaderCommand : IRequest<ApiResult<object>>
    {
        // 无需参数，返回所有生产工单及关联的物料群组
    }
}
